import { createApp } from 'vue'
import './style.css'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from './router/router'
import App from './App.vue'
import { createPinia } from 'pinia'
// import piniaPluginPersist from 'pinia-plugin-persist'
import './router/permission'
import { createPersistedState } from 'pinia-persistedstate-plugin'
const app = createApp(App)
const pinia = createPinia()
const persist = createPersistedState()
app.use(pinia)
pinia.use(persist)

app.use(ElementPlus)
app.use(router)
app.mount('#app') // 挂载到根元素